// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init({
    env:'tfjkp-0ge80vu9ea710148'
})

// 云函数入口函数 2.9 ~3s 调用时间，不明白时间为什么这么长
exports.main = async (event, context) => {
    const db = cloud.database()
    const uuidCollection = db.collection("uuidCollection")
    return new Promise((resolve, reject) => {
        // setTimeout(() => {
            uuidCollection
            .get()
            .then(res => {
                resolve(res)
            })
        // }, 3000)
      })
      
}